package com.sayice.design.lab3_1;

import com.sayice.design.lab3_1.builder.CarBuilder;
import com.sayice.design.util.XmlParse;
import org.xml.sax.SAXException;

import java.io.IOException;

/**
 * @author shubing
 */
public class Main {
    public static void main(String[] args) throws IOException, SAXException {
        CarBuilder carBuilder = (CarBuilder) new XmlParse("carBuilderConfig.xml")
                .objectOfTag("carBuilder");
        CarMaker carMaker = new CarMaker();
        carMaker.setCarBuilder(carBuilder);
        Car car = carMaker.construct();
        System.out.println(car);
    }
}
